//
//  DPAccessibilityNotificationCenter.h
//  UITestingKit
//
//  Created by Ofri Wolfus on 29/01/07.
//  Copyright 2007 Ofri Wolfus. All rights reserved.
//

#import <Foundation/Foundation.h>


@class DPUIElement;


/*!
 * @abstract A notification center used to access accessibility notifications.
 */
@interface DPAccessibilityNotificationCenter : NSNotificationCenter {
	NSNotificationCenter *nc;
	CFMutableDictionaryRef _axObservers;
}


/*!
 * @abstract Adds an entry to the receiver’s dispatch table with an observer,
 * a notification selector, sender optional criteria: notification name.
 *
 * @discussion If <code>notificationSender</code> is <code>nil</code>, the
 * system-wide element is assumed to be the sender (or <code>DPTestSubject</code>
 * when running in UITestingKit).
 */
- (void)addObserver:(id)notificationObserver
		   selector:(SEL)notificationSelector
			   name:(NSString *)notificationName
			 object:(DPUIElement *)notificationSender;

- (void)removeObserver:(id)notificationObserver
				  name:(NSString *)notificationName
				object:(DPUIElement *)notificationSender;

/*!
 * @abstract Creates a notification with a given name and sender
 * and posts it to the receiver.
 *
 * @param notificationSender The actual UI object posting the notification,
 * and <b>not</b> a DPUIElement instance.
 *
 * @param userInfo This parameter is ignored as accessibility notifications
 * does not contain additional information.
 */
- (void)postNotificationName:(NSString *)notificationName
					  object:(id)notificationSender
					userInfo:(NSDictionary *)userInfo;

@end
